FourCC = {}
setmetatable(FourCC, FourCC)

function FourCC:__call(name)
    if not self[name] then 
        if type(name) == 'string' then
            if name:len() == 1 then
                self[name] = name:byte()
            elseif name:len() == 4 then
                self[name] = string.unpack('>I4', name)
            end
        elseif type(name) == 'number' then 
            if name < 256 then
                self[name] = string.char(name)
            else
                self[name] = string.pack('>I4',name)
            end 
        end
    end 
    return self[name]
end

return FourCC